package com.free.company.member.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 功能概述:
 * </p>
 * <p>
 * 功能详述:
 * </p>
 */
@Component
@PropertySource("classpath:${spring.profiles.active}/datasource.properties")
@ConfigurationProperties(prefix=DataSourceProperties.PREFIX)
public class DataSourceProperties {
    /*========================================================================*
     *                         Public Fields (公共属性)
     *========================================================================*/

    /*========================================================================*
     *                         Private Fields (私有属性)
     *========================================================================*/
    public static final String PREFIX = "datasource";

    private String url;

    private String username;

    private String password;

    private String driverClassName;

    private Integer initialSize;

    private Integer minIdle;

    private Integer maxActive;

    private Integer maxWait;

    private Integer timeBetweenEvictionRunsMillis;

    private Integer minEvictableIdleTimeMillis;

    private String validationQuery;

    private Boolean testWhileIdle;

    private Boolean testOnBorrow;

    private Boolean testOnReturn;

    private Boolean poolPreparedStatements;

    private String filters;

    /*========================================================================*
     *                         Construct Methods (构造方法)
     *========================================================================*/

    /*========================================================================*
     *                         Public Methods (公有方法)
     *========================================================================*/
    public String getUrl()
    {
        return url;
    }

    public void setUrl(String url)
    {
        this.url = url;
    }

    public String getUsername()
    {
        return username;
    }

    public void setUsername(String username)
    {
        this.username = username;
    }

    public String getPassword()
    {
        return password;
    }

    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getDriverClassName()
    {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName)
    {
        this.driverClassName = driverClassName;
    }

    public Integer getInitialSize()
    {
        return initialSize;
    }

    public void setInitialSize(Integer initialSize)
    {
        this.initialSize = initialSize;
    }

    public Integer getMinIdle()
    {
        return minIdle;
    }

    public void setMinIdle(Integer minIdle)
    {
        this.minIdle = minIdle;
    }

    public Integer getMaxActive()
    {
        return maxActive;
    }

    public void setMaxActive(Integer maxActive)
    {
        this.maxActive = maxActive;
    }

    public Integer getMaxWait()
    {
        return maxWait;
    }

    public void setMaxWait(Integer maxWait)
    {
        this.maxWait = maxWait;
    }

    public Integer getTimeBetweenEvictionRunsMillis()
    {
        return timeBetweenEvictionRunsMillis;
    }

    public void setTimeBetweenEvictionRunsMillis(Integer timeBetweenEvictionRunsMillis)
    {
        this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
    }

    public Integer getMinEvictableIdleTimeMillis()
    {
        return minEvictableIdleTimeMillis;
    }

    public void setMinEvictableIdleTimeMillis(Integer minEvictableIdleTimeMillis)
    {
        this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
    }

    public String getValidationQuery()
    {
        return validationQuery;
    }

    public void setValidationQuery(String validationQuery)
    {
        this.validationQuery = validationQuery;
    }

    public Boolean getTestWhileIdle()
    {
        return testWhileIdle;
    }

    public void setTestWhileIdle(Boolean testWhileIdle)
    {
        this.testWhileIdle = testWhileIdle;
    }

    public Boolean getTestOnBorrow()
    {
        return testOnBorrow;
    }

    public void setTestOnBorrow(Boolean testOnBorrow)
    {
        this.testOnBorrow = testOnBorrow;
    }

    public Boolean getTestOnReturn()
    {
        return testOnReturn;
    }

    public void setTestOnReturn(Boolean testOnReturn)
    {
        this.testOnReturn = testOnReturn;
    }

    public Boolean getPoolPreparedStatements()
    {
        return poolPreparedStatements;
    }

    public void setPoolPreparedStatements(Boolean poolPreparedStatements)
    {
        this.poolPreparedStatements = poolPreparedStatements;
    }

    public String getFilters()
    {
        return filters;
    }

    public void setFilters(String filters)
    {
        this.filters = filters;
    }

    /*========================================================================*
     *                         Private Methods (私有方法)
     *========================================================================*/
}
